package cn.wusifx.zabbix.request.builder.service;

import cn.wusifx.zabbix.request.BaseRequest;
import cn.wusifx.zabbix.request.builder.UpdateRequestBuilder;

import java.util.Map;

/**
 * https://www.zabbix.com/documentation/4.0/manual/api/reference/service/update
 */
public class ServiceUpdateRequestBuilder extends UpdateRequestBuilder {
    private String serviceId;
    public ServiceUpdateRequestBuilder(String auth) {
        super("service.update", auth);
    }

    public ServiceUpdateRequestBuilder(Long id, String auth) {
        super("service.update", id, auth);
    }

    public String getServiceId() {
        return serviceId;
    }

    public ServiceUpdateRequestBuilder setServiceId(String serviceId) {
        this.serviceId = serviceId;
        return this;
    }

    @Override
    public BaseRequest<Map<String, Object>> builder() {
        baseRequest.getParams().put("serviceid",serviceId);
        return baseRequest;
    }
}
